package com.ning.cloud.gateway.enums;

import lombok.Getter;

@Getter
public enum ErrorCode {
    SUCCESS(0, "success"), //通用成功
    FAIL(10000, "fail"), //通用失败

    BAD_REQUEST(400, "参数错误"),
    UNAUTHORIZED(401, "用户未登录"),
    FORBIDDEN(403, "禁止访问"),
    NOT_FOUND(404, "资源不存在"),
    INTERNAL_ERROR(500, "服务器内部错误");

    private final Integer code;
    private final String message;

    ErrorCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
